/* kvs.h */

#define	KV_INIT_SUCCESS		0
#define	KV_INIT_FAIL		1
#define	KV_GET_SUCCESS		0
#define	KV_GET_FAIL		1
#define	KV_DELETE_SUCCESS	0
#define	KV_DELETE_FAIL		1
#define	KV_PUT_SUCCESS		0
#define	KV_PUT_FAIL		1
#define	KV_EXIT_SUCCESS		0

#define	KVS_CREATE		0
#define	KVS_LOAD		1
#define	PATHNAME_LEN		256   /*FIXME:*/

typedef struct
{
	int		init_type;
	int 		size_in_g;
	char		disk_file[PATHNAME_LEN];
	char		log[PATHNAME_LEN];
	char		mem_log[PATHNAME_LEN];
	char		disk_log[PATHNAME_LEN];
	char		sync_log[PATHNAME_LEN];
	char		index_log[PATHNAME_LEN];
	char		bitmap[PATHNAME_LEN];
} KVS_SET;
	
	

int	kv_init_2(KVS_SET*);
int	kv_init(char* config_file);
int	kv_exit();
int	kv_get(char* key, int key_size, char* buf, int buf_size);
int	kv_put(char* key, int key_size, char* value, int value_size);
int	kv_delete(char* key, int key_size);

